import java.util.Scanner;
public class array_2 {
    //数组的使用
    public static void main(String[] args){
        //1.定义数组
        double[] score = new double[5];

        //创建Scanner对象
        Scanner myscanner = new Scanner(System.in);
        for( int i = 0 ; i < score.length ; i++){
            System.out.println("请输入第"+(i+1)+"个元素的值：");
            score[i] = myscanner.nextDouble();
        }

        //输出遍历数组
        System.out.println("==当前数组的元素/值的情况如下：==");
        for( int i = 0 ; i < score.length ; i++ ){
            System.out.println("第"+(i+1)+"个元素的值="+score[i]);
        }

    }
}
